<template>
  <div class="footerBox">
  <div class="footer border-top">
    <div class="footerLeft" >产品价格<span>{{num*120}}￥</span></div>
    <div  class="footerRight" @click="tig">提交订单</div>
  </div>
  </div>
</template>

<script>
  export default {
    name: 'ShopPay',
    props: {
      num: Number
    },
    methods: {
      tig () {
        var sure = confirm("是否确定购买？");
        if(sure){
         alert("购买成功，祝你旅途愉快");
          this.$router.push('/')


        }else {
           confirm("是否放弃此次购买？")

        }

      }
    }
  }
</script>

<style  scoped>
  .footerBox {
    width:100%;
    height: 50px;
  }
  .footer {
    width:100%;
    height: 50px;
    position: fixed;
    bottom: 0;
    left: 0;
    background-color: green;
  }
  .footer .footerLeft {
    float: left;
    width: 50%;
    line-height: 50px;
    height: 50px;
    text-align: center;
  }
  .footerLeft span {
    font-size: 16px;
    color: red;
    margin-left: 5px;
  }
  .footer .footerRight {
    float: right;
    width: 50%;
    background-color: yellow;
    line-height: 50px;
    height: 50px;
    text-align: center;
  }
</style>





